package com.zs.demo.shiro;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.shiro.authc.AuthenticationToken;

/* @Desc: 自定义token
 * @author:zhengs  
 * @Time: 2018/11/23 11:09
 * @Copyright: © zhengs 版权所有  
 * @Warning: 本内容仅限于本公司内部传阅,禁止外泄或用于其它商业目的  
 */
@NoArgsConstructor
@Data
public class MyToken implements AuthenticationToken {

    private String token;

    private String username;

    private String password;

    private String uid;

    public MyToken(String token, String username, String password) {
        this.token = token;
        this.username = username;
        this.password = password;
    }

    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
